package com.chinairi.mall.controller;

import com.chinairi.mall.constant.CiccTableNameEnum;
import com.chinairi.mall.model.CiccRecord;
import com.chinairi.mall.service.CiccTableService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import java.util.Map;

/**
 * c类编码表数据获取
 * @author 李昌赐
 * @since 2020−11-24
 */

@Api(tags = "编码表数据获取")
@RequestMapping("cicc-data")
@RestController
@CrossOrigin
public class CiccTableController {

    @Autowired
    private CiccTableService ciccTableService;

    @ApiOperation("私信产品类型")
    @GetMapping("listProductType")
    public List<CiccRecord> listProductType(){ return ciccTableService.listProductType(); }

    @ApiOperation("订单确认状态")
    @GetMapping("listConfirmStatus")
    public List<CiccRecord> listConfirmStatus() {
        return ciccTableService.listConfirmStatus();
    }

    @ApiOperation("采购分类")
    @GetMapping("listPurchaseClassify")
    public List<CiccRecord> listPurchaseClassify() {
        return ciccTableService.listPurchaseClassify();
    }

    @ApiOperation("企业性质")
    @GetMapping("listEnterpriseChracter")
    public List<CiccRecord> listEnterpriseChracter() {
        return ciccTableService.listEnterpriseChracter();
    }

    @ApiOperation("合同类型")
    @GetMapping("listContractType")
    public List<CiccRecord> listContractType() {
        return ciccTableService.listContractType();
    }

    @ApiOperation("是否")
    @GetMapping("listYesNo")
    public List<CiccRecord> listYesNo() {
        return ciccTableService.listYesNo();
    }

    @ApiOperation("采购类型")
    @GetMapping("listPurchaseType")
    public List<CiccRecord> listPurchaseType() {
        return ciccTableService.listPurchaseType();
    }

    @ApiOperation("使用状态")
    @GetMapping("listUseStatus")
    public List<CiccRecord> listUseStatus() {
        return ciccTableService.listUseStatus();
    }

    @ApiOperation("支付类型")
    @GetMapping("listPayType")
    public List<CiccRecord> listPayType() {
        return ciccTableService.listPayType();
    }

    @ApiOperation("服务类型")
    @GetMapping("listServiceType")
    public  List<Map<String,Object>> listServiceType() {
        return ciccTableService.listServiceType();
    }

    @ApiOperation("审核状态")
    @GetMapping("listApproveSatus")
    public List<CiccRecord> listApproveSatus() {
        return ciccTableService.listApproveSatus();
    }

    @ApiOperation("项目类型")
    @GetMapping("listProjectType")
    public List<CiccRecord> listProjectType() {
        return ciccTableService.listProjectType();
    }

    @ApiOperation("产品状态")
    @GetMapping("listGoodsStatus")
    public List<CiccRecord> listGoodsStatus(){
        return ciccTableService.listGoodsStatus();
    }

    @ApiOperation("结算方式")
    @GetMapping("listSettleType")
    public List<CiccRecord> listSettleType(){
        return ciccTableService.listSettleType();
    }

    @ApiOperation("运输方式")
    @GetMapping("listTransportType")
    public List<CiccRecord> listTransportType(){
        return ciccTableService.listTransportType();
    }

    @ApiOperation("领料类型")
    @GetMapping("listPickingType")
    public List<CiccRecord> listPickingType(){
        return ciccTableService.listPickingType();
    }

    @ApiOperation("资质类型")
    @GetMapping("listQulificationType")
    public List<CiccRecord> listQulificationType(){
        return ciccTableService.listQulificationType();
    }

    @ApiOperation("用户类型")
    @GetMapping("listUserType")
    public List<CiccRecord> listUserType(){
        return ciccTableService.listUserType();
    }

    @ApiOperation("质控等级")
    @GetMapping("listQualityControl")
    public List<CiccRecord> listQualityControl() {
        return ciccTableService.listQualityControl();
    }

}
